nonsense not much to say, directly on the program ha:Name=Input' Name: ')height=Input' Height (m): ')weight=Input' Weight (kg): ')Bmi=FloatFloat (weight)/(Float (height) * *2))Print‘You aBmiThe index is:', BIM)If BMI 18.5: Print‘You are too light!‘)Elif bmi25: print ( ' standard weight Oh Oh! elif bmi32: print ( ' You are a little chubby oh Oh! else: print ( ' You're too fat to lose weigh
Recent project needs, need to do a BMI indicator bar, first on the effect chart:
The BMI index ranges from 18 to 35, and the color of the above indicator changes as the offset changes, and the number shows the current BMI, and the following BMI is judged by the range of values. Considering the specificity of this vi
of the commodity is--%s--, you have the remaining--%s--"% (A, goods[a-1].get ("Prices"), Money-goods[a-1].get ("value"))Money = Money-goods[a-1].get ("Price")ElsePrint ("Insufficient balance to purchase!")BreakElsePrint ("Input error!!! Please re-enter: ")Print (LST)Print ("You also have the remaining--{} dollar--You have now successfully purchased the following products:". Format (Money))For I in LST:Print (Goods[i-1].get ("name"))Print ("End of shopping!")# 1. Create and export the menu, the
height = input (' How tall is your height: ')height = float (height)if 0.01print ()elif heightprint ("Are you sure you're human?" ")Else:exit (' Please enter the correct value ')weight = input (' Your weight is how many kg: ')weight = float (weight)BMI = weight/(height*height)if BMI >=30:print (' severe obesity ')elif bmi>=27:print (' obese ')elif
Example:Xiao Ming is 1.75 tall and weighs 80.5kg. Please help Xiao Ming calculate his BMI according to the BMI formula (weight divided by the square of height) and according to the BMI Index:
Less than 18.5: too light
18.5-25: Normal
25-28: Overweight
28-32: Obesity
Above 32: Severe obesity
Use If-elif to determine and print the resu
Using Javascript to implement BMI calculator, javascriptbmi
Preface
BMI Index (Body Mass Index in English) is a commonly used international standard for measuring the degree of obesity and health, when we need to compare and analyze the health impact of a person's weight on people of different heights, the BMI value is a neutral and reliable indicator. This artic
Objective
BMI index (Body Mass index), is a standard commonly used internationally to measure the level of weight and fitness of the human body, and when we need to compare and analyze the health effects of a person's weight on people of different heights, BMI is a neutral and reliable indicator. This article will show you how to implement this calculator with JavaScript, see below.
Not much to say, direc
How to obtain the correct widget size when the widget is not displayed by Qt, and how to obtain the widget size by qt
This is because you want to display a dialog box in full screen mode, and there are several QLabel sizes in the dialog box. After determining the maximum available QLabel sizes, you can adjust the QLabel sizes Based on the content, therefore, you
Desktop widgets that recently need to write a DateTime are used to associate calendar programs, and desktop widgets have rarely been written before. Not very familiar with this technique, take the time to rearrange it today, and write down a simple time and date process.
The Desktop widget is a tool for displaying some information (some widgets are now being developed with practical functions.) For example, a camera
Open the Google API and make the following description of the widget widget:APP Widgets is miniature application views that can is embedded in otherapplications (such as the Home screen) and receive Periodic updates. These views arereferred to as Widgets in the user interface,and you can publish one and an App Widget provider. An application componentthat is able-to-hold other app Widgets are called an app
Add widgets on the screen: or tap and hold the screen blank, or find the Widgetpreview app selection. Native system 4.0 or less using long press, 4.0 and above open widgetsGeneral steps for creating widgets:In the MenifestWidget description File: timer_widget_provider.xmlLayout used by widget: Timer_widget.xmlHandling widget-related events AppwidgetproviderPackage Com.stone.ui;import Java.util.arrays;import
First, create a new directory Second, create a new file Third, write Urtil widget code Four, write Redtextdialog code Five, write HTML code ===================== If you do not understand, combined with http://blog.csdn.net/eengel/article/details/13021687 view, do not like to spray, Specific as follows One, two: Create a new file, create a new directory, import a dojo Package Third, write Urtil widget coded
How to modify the child widget style of the parent widget in vue.
During Development Using vue, we sometimes reference external components, including the UI components (ElementUI and iview ).
When the
Write the style of the Child widget to the global style above.
3. Use the depth Selector
If you want a selector in the scoped style to be "more effective", such a
NullPointerException at android. widget. AbsListView. obtainView at android. widget. ListView. makeAndAddView, androidlistview
When using ExpandableListView, the following error is returned. Online Search found that null was returned in the getGroupView () method of CommonNumberQueryAdapter. Pay attention to the details !!!
12-19 17:32:41. 822: E/AndroidRuntime (1894): fatal exception: main12-19
Today, there is a requirement that some widgets not be displayed when you bring up your phone widget. Toss for a long time, although do not know the principle, and finally achieved the shielding of individual small parts of the method. Record them.To block the display of the bottom widget, simply comment out the relevant class with the declaration that is broadcast in manifest.Comment out in activityandroid
Many people on the internet use view to set controls. setPadding (left, top, right, bottom) is actually a bad thing. It is used to set the offset of its own position. We seldom need this effect, set the position of the control relative to X and Y in the upper left corner of the screen. The crowd looked for him and looked back, but the man was in the dark!
Copy codeThe Code is as follows: import android. view. View;
Import android. view. ViewGroup. MarginLayoutParams;
Import android.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.